import Vue from "vue";
import VueRouter from "vue-router";
import { Message } from "element-ui";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "Login",
    component: resolve => require(["@/components/Login.vue"], resolve),
    meta: {
      keepAlive: false // 不需要被缓存
    }
  },
  {
    path: "/Index",
    name: "Index",
    component: resolve => require(["@/views/Index.vue"], resolve),
    meta: {
      keepAlive: false
    },
    children: [
      {
        path: "/Index/Data",
        name: "Data",
        component: resolve => require(["@/views/system/Data.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/workbench",
        name: "workbench",
        component: resolve => require(["@/views/workbench/index.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/Role",
        name: "Role",
        component: resolve => require(["@/views/system/Role.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/Organization",
        name: "Organization",
        component: resolve =>
          require(["@/views/system/Organization.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/Employees",
        name: "Employees",
        component: resolve =>
          require(["@/views/system/Employees.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/Approval",
        name: "Approval",
        component: resolve => require(["@/views/system/Approval.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/ProductModel",
        name: "ProductModel",
        component: resolve =>
          require(["@/views/business/ProductModel.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/ValueAdded",
        name: "ValueAdded",
        component: resolve =>
          require(["@/views/business/ValueAdded.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/ValueAdded/*",
        component: resolve =>
          require(["@/views/business/ValueAdded.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/NewSingleEntry",
        name: "NewSingleEntry",
        component: resolve =>
          require(["@/views/business/NewSingleEntry.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/HasBeenRecorded/",
        name: "HasBeenRecorded",
        component: resolve =>
          require(["@/views/business/HasBeenRecorded.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/Examination",
        name: "Examination",
        component: resolve =>
          require(["@/views/business/Examination.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/ToSubmit",
        name: "ToSubmit",
        component: resolve =>
          require(["@/views/business/ToSubmit.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {

        path: "/Index/ToBeLent",
        component: resolve =>
          require(["@/views/business/ToBeLent.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/Ajf",
        name: "Ajf",
        component: resolve => require(["@/views/business/Ajf.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/Terminated",
        name: "Terminated",
        component: resolve =>
          require(["@/views/business/Terminated.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/TerminatedAjf",
        name: "TerminatedAjf",
        component: resolve =>
          require(["@/views/business/TerminatedAjf.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/Released",
        name: "Released",
        component: resolve =>
          require(["@/views/business/Released.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/ReleasedAjf",
        name: "ReleasedAjf",
        component: resolve =>
          require(["@/views/business/ReleasedAjf.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      //待跟进
      {
        path: "/Index/ToBeFollow",
        name: "ToBeFolow",
        component: resolve =>
          require(["@/views/business/ToBeFol.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      // 乐业分分期
      {
        path: "/Index/ProductModelList",
        name: "ProductModelList",
        component: resolve =>
          require(["@/views/businessList/ProductModel.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/ValueAddedList",
        name: "ValueAddedList",
        component: resolve =>
          require(["@/views/businessList/Index.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/NewSingleEntryList",
        name: "NewSingleEntryList",
        component: resolve =>
          require(["@/views/businessList/NewSingleEntry.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/HasBeenRecordedList/",
        name: "HasBeenRecordedList",
        component: resolve =>
          require(["@/views/businessList/HasBeenRecorded.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/ExaminationList",
        name: "ExaminationList",
        component: resolve =>
          require(["@/views/businessList/Examination.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/ToSubmitList",
        name: "ToSubmitList",
        component: resolve =>
          require(["@/views/businessList/ToSubmit.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/ToBeLentList",
        component: resolve =>
          require(["@/views/businessList/ToBeLent.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/TerminatedList",
        name: "TerminatedList",
        component: resolve =>
          require(["@/views/businessList/Terminated.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/ReleasedList",
        name: "ReleasedList",
        component: resolve =>
          require(["@/views/businessList/Released.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      //待跟进
      {
        path: "/Index/ToBeFollowList",
        name: "ToBeFolowList",
        component: resolve =>
          require(["@/views/businessList/ToBeFol.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      //
      {
        path: "/Index/RegisteredUsers",
        name: "RegisteredUsers",
        component: resolve =>
          require(["@/views/user/RegisteredUsers.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/Commission",
        name: "Commission",
        component: resolve =>
          require(["@/views/royalty/Commission.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/Team",
        name: "Team",
        component: resolve => require(["@/views/royalty/Team.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/Invitation",
        name: "Invitation",
        component: resolve => require(["@/views/user/Invitation.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/Achievement",
        name: "Achievement",
        component: resolve =>
          require(["@/views/user/Achievement.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/Partner",
        name: "Partner",
        component: resolve => require(["@/views/royalty/Partner.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/ContentList",
        name: "ContentList",
        component: resolve =>
          require(["@/views/content/ContentList.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      //评论管理!
      {
        path: "/business/forumComment/list",
        name: "forumCommentList",
        component: resolve =>
          require(["@/views/content/Comments.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/business/forum/topicList",
        name: "topicList",
        component: resolve =>
          require(["@/views/content/Postmanagement.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/Accfund",
        name: "Accfund",
        component: resolve => require(["@/views/accfund/Accfund.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/NewAccfund",
        name: "NewAccfund",
        component: resolve =>
          require(["@/views/accfund/NewAccfund.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/Entered",
        name: "Entered",
        component: resolve => require(["@/views/accfund/Entered.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/ExaminationAcc",
        name: "ExaminationAcc",
        component: resolve =>
          require(["@/views/accfund/Examination.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/ToSubmitAcc",
        name: "ToSubmitAcc",
        component: resolve =>
          require(["@/views/accfund/Tosubmit.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/ToBeLentAcc",
        name: "ToBeLentAcc",
        component: resolve =>
          require(["@/views/accfund/ToBeLent.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/ReleasedAcc",
        name: "ReleasedAcc",
        component: resolve =>
          require(["@/views/accfund/Released.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/TerminAcc",
        name: "TerminAcc",
        component: resolve =>
          require(["@/views/accfund/Terminated.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/MortList",
        name: "MortList",
        component: resolve => require(["@/views/mortgage/Index.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/website/news",
        name: "news",
        component: resolve => require(["@/views/business/news.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/NewMort",
        name: "NewMortList",
        component: resolve =>
          require(["@/views/mortgage/NewMort.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/EntertMort",
        name: "EntertMortList",
        component: resolve =>
          require(["@/views/mortgage/Entered.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/ExaminMort",
        name: "ExaminMortList",
        component: resolve =>
          require(["@/views/mortgage/ExaminMort.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/TosubmitMort",
        name: "TosubmitMortList",
        component: resolve =>
          require(["@/views/mortgage/Tosubmit.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/ToBeLentMort",
        name: "ToBeLentMortList",
        component: resolve =>
          require(["@/views/mortgage/ToBeLent.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/ReleasedMort",
        name: "ReleasedMortList",
        component: resolve =>
          require(["@/views/mortgage/Released.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/TermMort",
        name: "TermMortList",
        component: resolve =>
          require(["@/views/mortgage/Terminated.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      // 普通按揭
      {
        path: "/Index/ordinaryMortList",
        name: "MortListOrd",
        component: resolve =>
          require(["@/views/ordinaryMortgage/Index.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/ordinary/NewMort",
        name: "NewMort",
        component: resolve =>
          require(["@/views/ordinaryMortgage/NewMort.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/ordinary/EntertMort",
        name: "EntertMort",
        component: resolve =>
          require(["@/views/ordinaryMortgage/Entered.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/ordinary/ExaminMort",
        name: "ExaminMort",
        component: resolve =>
          require(["@/views/ordinaryMortgage/ExaminMort.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/ordinary/TosubmitMort",
        name: "TosubmitMort",
        component: resolve =>
          require(["@/views/ordinaryMortgage/Tosubmit.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/ordinary/ToBeLentMort",
        name: "ToBeLentMort",
        component: resolve =>
          require(["@/views/ordinaryMortgage/ToBeLent.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/ordinary/ReleasedMort",
        name: "ReleasedMort",
        component: resolve =>
          require(["@/views/ordinaryMortgage/Released.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/ordinary/TermMort",
        name: "TermMort",
        component: resolve =>
          require(["@/views/ordinaryMortgage/Terminated.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      //法拍房
      {
        path: "/Index/FapaiList",
        name: "FapaiList",
        component: resolve => require(["@/views/fapai/Index.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/NewFapai",
        name: "NewFapai",
        component: resolve => require(["@/views/fapai/NewOrder.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/EntertFapai",
        name: "EntertFapai",
        component: resolve => require(["@/views/fapai/Entered.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/ExaminFapai",
        name: "ExaminFapai",
        component: resolve =>
          require(["@/views/fapai/ExaminFapai.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/TosubmitFapai",
        name: "TosubmitFapai",
        component: resolve => require(["@/views/fapai/Tosubmit.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/ToBeLentFapai",
        name: "ToBeLentFapai",
        component: resolve => require(["@/views/fapai/ToBeLent.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/ReleasedFapai",
        name: "ReleasedFapai",
        component: resolve => require(["@/views/fapai/Released.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/TermFapai",
        name: "TermFapai",
        component: resolve =>
          require(["@/views/fapai/Terminated.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      // 电子合同
      {
        path: "/Index/ElectronicContract",
        name: "ElectronicContract",
        component: resolve =>
          require([
            "@/views/electronicContract/ElectronicContract.vue"
          ], resolve),
        meta: {
          keepAlive: false
        }
      },
      // 分期管理
      {
        path: "/Index/PersonnelStaging",
        name: "PersonnelStaging",
        component: resolve =>
          require(["@/views/byStages/PersonnelStaging.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      // 提前结清
      {
        path: "/Index/earlySettlement",
        name: "PersonnelStaging",
        component: resolve =>
          require(["@/views/byStages/earlySettlement.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/MonthlyStaging",
        name: "MonthlyStaging",
        component: resolve =>
          require(["@/views/byStages/MonthlyStaging.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/Management",
        name: "Management",
        component: resolve =>
          require(["@/views/electronicContract/Management.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      //人员分期
      {
        path: "/Index/researchersInstallment",
        name: "researchersInstallment",
        component: resolve =>
          require(["@/views/byStages/researchersInstallment.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      //逾期扣款记录
      {
        path: "/Index/OverdueRecord",
        name: "OverdueRecord",
        component: resolve =>
          require(["@/views/byStages/OverdueRecord.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },

      //担保费分期
      {
        path: "/Index/paymentInstallment",
        name: "paymentInstallment",
        component: resolve =>
          require(["@/views/byStages/paymentInstallment.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      // 等级管理
      {
        path: "/Index/DtgGrade",
        name: "DtgGrade",
        component: resolve => require(["@/views/system/DtgGrade.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },


      //项目统计-内勤绩效
      {
        path: "/Index/InternalWorkStatistics",
        name: "InternalWorkStatistics",
        component: resolve =>
          require(["@/views/projectManagement/InternalWorkStatistics.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      //项目统计-下户绩效
      {
        path: "/Index/UnderDoorStatistics",
        name: "UnderDoorStatistics",
        component: resolve =>
          require(["@/views/projectManagement/UnderDoorStatistics.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      //项目统计-业务部绩效

      {
        path: "/Index/SalesDepartmentStatisics",
        name: "SalesDepartmentStatisics",
        component: resolve =>
          require(["@/views/projectManagement/SalesDepartmentStatisics.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      //项目统计-权证部绩效
      {
        path: "/Index/WarrantStatisics",
        name: "WarrantStatisics",
        component: resolve =>
          require(["@/views/projectManagement/WarrantStatistics.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      // 不动产
      {
        path: "/Index/RealEstate",
        name: "RealEstate",
        component: resolve =>
          require(["@/views/realEstate/RealEstate.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/Estate",
        name: "SurEstate",
        component: resolve =>
          require(["@/views/realEstate/SurEstate.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/EstateRes",
        name: "SurEstateRes",
        component: resolve =>
          require(["@/views/realEstate/Result.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      // 产品合同
      {
        path: "/Index/ProductContract",
        name: "ProductContract",
        component: resolve =>
          require(["@/views/electronicContract/ProductContract.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      // 线上合同表
      {
        path: "/Index/OnlineContract",
        name: "ProductContract",
        component: resolve =>
          require(["@/views/electronicContract/OnlineContract.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        //下户
        path: "/Index/Survey",
        name: "Survey",
        component: resolve => require(["@/views/surve/Survey.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/ExistSurvey",
        name: "ExistSurvey",
        component: resolve =>
          require(["@/views/surve/ExisetSurvey.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/Index/SurResult",
        name: "SurResult",
        component: resolve => require(["@/views/surve/SurResult.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        path: "/index/api",
        name: "indexs",
        component: resolve => require(["@/components/survey/imgView.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      // 融银贷！
      {
        // 列表页！
        path: "/Index/MeitList/ValueAdded/*",
        component: resolve =>
          require(["@/views/meitList/ValueAdded.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        // 添加订单页！
        path: "/Index/MeitAdd",
        name: "MeitAdd",
        component: resolve =>
          require(["@/views/meitList/MeitAdd.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        // 已录入状态！
        path: "/Index/MeitList/HasBeen",
        name: "MeitListHas",
        component: resolve =>
          require(["@/views/meitList/HasBeenRecorded.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        // 已录入状态！
        path: "/contract/summary",
        name: "summary",
        component: resolve =>
          require(["@/views/business/contract.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        // 审批中！
        path: "/Index/MeitList/Exam",
        name: "MeitListExam",
        component: resolve =>
          require(["@/views/meitList/Examination.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        // 代交件！
        path: "/Index/MeitList/Tosub",
        name: "MeitListTosub",
        component: resolve =>
          require(["@/views/meitList/ToSubmit.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        // 待放款！
        path: "/Index/MeitList/ToBe",
        component: resolve =>
          require(["@/views/meitList/ToBeLent.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        // 已回款！
        path: "/Index/MeitList/Term",
        name: "MeitListTerm",
        component: resolve =>
          require(["@/views/meitList/Terminated.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      {
        // 已放款！
        path: "/Index/Meitlist/Rele",
        name: "MeitlistRele",
        component: resolve =>
          require(["@/views/meitList/Released.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      //待跟进!
      {
        path: "/Index/Meitlist/Tobes",
        name: "MeitlistTobe",
        component: resolve =>
          require(["@/views/meitList/ToBeFol.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      //提现管理!
      {
        path: "/business/extract/page",
        name: "extract",
        component: resolve =>
          require(["@/views/withdrawal/withdrawalList.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      //提现管理!
      {
        path: "/business/quickApply/page",
        name: "extract",
        component: resolve =>
          require(["@/views/Businessis/BusinessList.vue"], resolve),
        meta: {
          keepAlive: false
        }
      }, {
        path: "/business/quickApply/name",
        name: "123",
        component: resolve =>
          require(["@/views/workBtn/1.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },
      //业务管理=>订单汇总路由!
      {
        path: "/business/allOrder/page",
        name: "summary",
        component: resolve =>
          require(["@/views/business/summary.vue"], resolve),
        meta: {
          keepAlive: false
        }
      },

      {
        //上级管理=>注册管理总路由!

        path: "/business/h5enroll/page",
        name: "Registration",
        component: resolve =>
          require(["@/views/Businessis/Registration"], resolve),
        meta: {
          keepAlive: false
        }

      },
      {
        //积分商城管理=>商品信息!

        path: "/business/mall/commodityList",
        name: "commodityList",
        component: resolve =>
          require(["@/views/mall/commodityList"], resolve),
        meta: {
          keepAlive: false
        }

      },
      {
        //积分商城管理=>收货人信息!

        path: "/business/consigneeInfo/pageList",
        name: "pageList",
        component: resolve =>
          require(["@/views/mall/pageList"], resolve),
        meta: {
          keepAlive: false
        }

      },
      {
        //积分商城管理=>积分明细!

        path: "/business/integral/pageList",
        name: "integral",
        component: resolve =>
          require(["@/views/mall/integral"], resolve),
        meta: {
          keepAlive: false
        }

      },
      {
        //房屋评估=>评估列表
        path: "/housingAssessment/evaluationList",
        name: "evaluationList",
        component: resolve =>
          require(["@/views/housingAssessment/evaluationList"], resolve),
        meta: {
          keepAlive: false
        }

      }, {
        //财务管理=>客户完结情况表
        path: "/financialManagement/customerClosure",
        name: "customerClosure",
        component: resolve =>
          require(["@/views/financialManagement/customerClosure"], resolve),
        meta: {
          keepAlive: false
        }

      }, {
        //财务管理=>代偿客户统计
        path: "/financialManagement/compensationCustomerStatistics",
        name: "compensationCustomerStatistics",
        component: resolve =>
          require(["@/views/financialManagement/compensationCustomerStatistics"], resolve),
        meta: {
          keepAlive: false
        }

      }, {
        //贷后管理=>贷后列表
        path: "/postLoanManagement/postCreditList",
        name: "postCreditList",
        component: resolve =>
          require(["@/views/postLoanManagement/postCreditList"], resolve),
        meta: {
          keepAlive: false
        }

      },
      {
        //贷后管理=>贷后详情
        path: "/postLoanManagement/postCreditDetails",
        name: "postCreditDetails",
        component: resolve =>
          require(["@/views/postLoanManagement/postCreditDetails"], resolve),
        meta: {
          keepAlive: false
        }

      }


    ]
  },
  {
    path: "/404",
    component: resolve => require(["@/views/error/404"], resolve),
    hidden: true
  },
  {
    path: "*",
    component: resolve => require(["@/views/error/404"], resolve)
  }
];

const router = new VueRouter({
  routes
});

// 路由的全局前置守卫（拦截器）--路由跳转之前执行 验证是否有携带token权限
router.beforeEach((to, from, next) => {
  // console.log(to, "222222")
  // console.log(from, "111111")
  // let inint = sessionStorage.getItem("prductId")
  // console.log(inint)

  let token = localStorage.getItem("token");

  if (to.name == "Login" || token) {
    next();
  } else {
    localStorage.clear();
    sessionStorage.clear();
    Message.success("请先登陆");
    router.push("/");
  }
});

export default router;
